home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 71
/
MOBICLIC 71.ISO
/
mac
/
DATA
/
COMMUN
/
temp0001
/
00265_Script_SCRIPTS_GENE_JLM_02
< prev
next >
Wrap
Text File
|
2004-12-05
|
15KB
|
390 lines
on getURL me,MODE,STUFF1--message envoyΘ par un swf α Director--------------
global g_ZFlashsound
case(MODE) of
1:--lancement d'un son externe dans un swf importΘ
g_ZFlashsound = 1
temp = value(STUFF1)
if voidP(temp) then
joueson(string(STUFF1))
else
sonRub(gimme2digits(temp))
end if
3:--lancement d'un bruitage externe dans un swf importΘ (ne baisse pas le son des autres pistes
g_ZFlashsound = 1
lowjoueson(string(STUFF1),2)
2:--pas de son
g_ZFlashsound = 0
otherwise
--
end case
end
---------------------
on TITRE TRUC
global gZ_pisteTitre, gL_sRubTitres
case(sprite(gZ_pisteTitre).member.type) of
#bitmap:-- titrage rasterisΘ
if TRUC = 0 then
sprite(gZ_pisteTitre).member = "TITRE_NOP"
sprite(gZ_pisteTitre).blend = 0
else
if value(TRUC) = TRUC then
sprite(gZ_pisteTitre).member = "TITRE_"&gimme2digits(TRUC)
else
sprite(gZ_pisteTitre).member = "TITRE_"&TRUC
end if
sprite(gZ_pisteTitre).blend = 100
end if
#text:--titre par conteneur texte
if TRUC = 0 then
sprite(gZ_pisteTitre).member.text = EMPTY
else
-- sprite(gZ_pisteTitre).member.text = gL_sRubTitres[TRUC]
sprite(gZ_pisteTitre).member.text = TRUC
end if
end case
updateStage
end
----------------------
on TFC()
load_localTextes()
end
--------------------
on load_localTextes
global L_TANKER
-- if the runMode = "author" and lien() = ":" then
if the runMode = "author" then
fin = the number of members of castLib(1)
flag = 0
test = COMMENT_TANK()
repeat with i = 1 to fin
if member(i).name = test then
flag = 1
exit repeat
end if
end repeat
if flag = 0 then
newmember = new(#text)
member(newmember).name = test
member(newmember).font = "Comic Sans MS"
end if
if the paramCount = 0 then--importation directe
u = member("LOCAL_MATOS").castLibNum
v = member("LOCAL_MATOS").memberNum
importFileInto member("LOCAL_MATOS"), "@//COMMUN/DATABASE/"&zracine()&".rtf"
member(v,u).name = "LOCAL_MATOS"
else
--copier coller
end if
temp = member("LOCAL_MATOS").text
TANKER = EMPTY
L_TANKER = [#_TITRE:0]
-------------------------------------------------------------on charge le titre zapette
M = offset("@titre",temp)
N = offset("@aide",temp)
tampon = temp.char[M..N-1]
-- on retire la premiΦre ligne (qui contient"@titre")
fin = tampon.line.count
tampon = tampon.line[2..fin]
-- on retire les lignes blanches, les sauts de lignes et espaces finals
TANKER = TANKER&cleanTail(tampon)&RETURN
repere1 = 1
repere2 = TANKER.char.count
L_TANKER._TITRE = [repere1,repere2]
-------------------------------------------------------------on charge l'aide
M = N
N = offset("@info",temp)
tampon = temp.char[M..N-1]
-- on retire la premiΦre ligne (qui contient"@aide")
fin = tampon.line.count
tampon = tampon.line[2..fin]
-- on retire les lignes blanches, les sauts de lignes et espaces finals
TANKER = TANKER&cleanTail(tampon)&RETURN
repere1 = repere2 + 1
repere2 = TANKER.char.count
L_TANKER.addProp(#_AIDE,[repere1,repere2])
------------------------------------------------------------on charge l'info
M = N
N = offset("@dico",temp)
tampon = temp.char[M..N-1]
-- on retire la premiΦre ligne (qui contient"@aide")
fin = tampon.line.count
tampon = tampon.line[2..fin]
-- on retire les lignes blanches, les sauts de lignes et espaces finals
TANKER = TANKER&cleanTail(tampon)&RETURN
repere1 = repere2 + 1
repere2 = TANKER.char.count
L_TANKER.addProp(#_INFO,[repere1,repere2])
------------------------------------------------------------on charge le dico
M = N
N = offset("@@",temp)
tampon = temp.char[M..N-1]
-- on retire la premiΦre ligne (qui contient"@aide")
fin = tampon.line.count
tampon = tampon.line[2..fin]
-- on retire les lignes blanches, les sauts de lignes et espaces finals
TANKER = TANKER&cleanTail(tampon)&RETURN
repere1 = repere2 + 1
repere2 = TANKER.char.count
L_TANKER.addProp(#_DICO,[repere1,repere2])
------------------------------------------------------------on charge les commentaires
--on dΘlimite la fourchette de charactΦres α prendre
M = offset("@@",temp)
N = offset("@EOF",temp)
tampon = temp.char[M+2..N]
M = offset("@",tampon)--on recherche la position du premier commentaire
N = tampon.char.count
BRUT = tampon.char[M+1..N]--on part du 2Φme caractΦre (on supprime "@")
repere1 = repere2 + 1--initialisation du compteur de repΦre de dΘbut de comment dans TANKER
repeat while N > 0 and BRUT <> EMPTY
M = 1
N = offset("@",BRUT)
tampon = cleanTail(BRUT.char[M..N])-- on stocke le bloc commentaire repΘrΘ,on va le nettoyer
Nblignes = tampon.line.count
nomSon = cleanTail(tampon.line[1])--on nettoie la fin de la premiΦre ligne pour obtenir le nom du fichier son
texte = cleantail(tampon.line[2..Nblignes-1])-- on extrait le texte en retirant la ligne 1 (nom du son), la derniΦre (contient @) et en nattoyant
--les lignes blanches
if zRacine() = "QUIZ00" then texte = texte.line[1]--dans le cas du quizz on supprime les propositions
TANKER = TANKER&texte&RETURN
repere2 = TANKER.char.count -1
L =[repere1,repere2]-----on pile le nom du son, le repΦre de dΘbut de comment, celui de fin
repere1 = repere2 + 2
Lrestant = BRUT.char.count
BRUT = BRUT.char[N + 1..Lrestant]-- on retire la partie traitΘe (y compris le @ de dΘbut de ligne)
L_TANKER.addProp(CLEANLOWCASE(nomSon),L)
end repeat
member(COMMENT_TANK()).text = cleanTail(TANKER)&RETURN&string(L_TANKER)
member(COMMENT_TANK()).font = "Comic Sans MS"
-------------------------------------------------------------dans le cas de QUIZCITY on charge les questions
if zRacine() = "QUIZ00" then load_QUIZmatos()
end if
end
----------------------------------
on load_QUIZmatos
global gNbQ_TED, gNbQ_ButTED
if voidP(gNbQ_TED) then gNbQ_TED = localdata(2)
if voidP(gNbQ_ButTED) then gNbQ_ButTED = localdata(4)
LQ = []
-- temp = member("MATOS_BRUT").text
temp = member("LOCAL_MATOS").text
--on dΘlimite la fourchette de caractΦres α prendre
repeat with i = 1 to gNbQ_TED--on charge les infos concernant le quiz tout est dit---------------------
L_localQ = []
M = offset("@quiz"&gimme2digits(i),temp)
if i < gNbQ_TED then
N = offset("@quiz"&gimme2digits(i+1),temp)
else
N = offset("@quiz"&gimme2digits(40),temp)
end if
tampon = temp.char[M..N-1]
fin = tampon.line.count
--on retire la premiΦre ligne (qui contient"@quizXX.aif")
tampon = tampon.line[2..fin]
-- on retire les lignes blanches α la fin
u = fin
repeat while tampon.line[u] = EMPTY
u = u-1
tampon = tampon.line[1..u]
end repeat
-- on retire le saut de ligne
fin = tampon.char.count
if tampon.char[fin] = RETURN then tampon = tampon.char[1..fin-1]
--on enregistre la question
L_localQ.add(tampon.line[1])
--on retire la ligne de la question
fin = tampon.line.count
tampon = tampon.line[2..fin]
-- on retire les lignes blanches entre la question et les rΘponses
u = tampon.line.count
repeat while tampon.line[1] = EMPTY
tampon = tampon.line[2..U]
u = u-1
end repeat
repeat with j = 1 to 3
v = tampon.line[j]
if v contains "jpg" or v contains "pct" then--rΘponse associΘe α une image
if v contains "(OK)" then NoGood = j
if v contains "jpg" then
suffixe =".jpg"
else
if v contains "pct" then
suffixe =".pct"
end if
end if
L_localQ.add(["I", "PH"&gimme2digits(i)&"_"&j&suffixe])
else
if v contains "mov" then--rΘponse associΘe α une vidΘo
if v contains "(OK)" then NoGood = j
L_localQ.add(["V", "V_"&gimme2digits(i)&"_"&j&".mov"])
else
if v contains "BOUCLE_" then--rΘponse associΘe α une boucle animΘe
L_localQ.add(["B", "V"&gimme2digits(i)&"_"&j])
else
if v contains "aif" or v contains "mp3" then--rΘponse associΘe α un son
if v contains "(OK)" then NoGood = j
if v contains "aif" then
suffixe =".aif"
else
if v contains "mp3" then
suffixe =".mp3"
end if
end if
L_localQ.add(["S", "S"&gimme2digits(i)&"_"&j&suffixe])
else--rΘponse associΘe α un texte
if v contains "(OK)" then
NoGood = j
EOL = offset("(OK)",v)-1
v= cleanTail(v.char[1..EOL-1])
end if
L_localQ.add(["T", cleanTail(v)])
end if
end if
end if
end if
end repeat
L_localQ.add(NoGood)
LQ.add(L_localQ)
end repeat
------------------------------------
repeat with i = 40 to 39 + gNbQ_ButTED--on charge les infos concernant le reste du quiz
L_localQ = []
M = offset("@quiz"&gimme2digits(i),temp)
if i < 39 + gNbQ_ButTED then
N = offset("@quiz"&gimme2digits(i+1),temp)
else
N = offset("@EOF",temp)
end if
tampon = temp.char[M..N-1]
fin = tampon.line.count
--on retire la premiΦre ligne (qui contient"@quizXX.aif")
tampon = tampon.line[2..fin]
-- on retire les lignes blanches α la fin
u = fin
repeat while tampon.line[u] = EMPTY
u = u-1
tampon = tampon.line[1..u]
end repeat
-- on retire le saut de ligne
fin = tampon.char.count
if tampon.char[fin] = RETURN then tampon = tampon.char[1..fin-1]
--on enregistre la question
L_localQ.add(tampon.line[1])
--on retire la ligne de la question
fin = tampon.line.count
tampon = tampon.line[2..fin]
-- on retire les lignes blanches entre la question et les rΘponses
u = tampon.line.count
repeat while tampon.line[1] = EMPTY
tampon = tampon.line[2..U]
u = u-1
end repeat
repeat with j = 1 to 3
v = tampon.line[j]
if v contains "jpg" or v contains "pct" then--rΘponse associΘe α une image
if v contains "(OK)" then NoGood = j
if v contains "jpg" then
suffixe =".jpg"
else
if v contains "pct" then
suffixe =".pct"
end if
end if
L_localQ.add(["I", "PH"&gimme2digits(i)&"_"&j&suffixe])
else
if v contains "mov" then--rΘponse associΘe α une vidΘo
if v contains "(OK)" then NoGood = j
L_localQ.add(["V", "V"&gimme2digits(i)&"_"&j&"mov"])
else
if v contains "BOUCLE_" then--rΘponse associΘe α une boucle animΘe
L_localQ.add(["B", "V_"&gimme2digits(i)&"_"&j])
else
if v contains "aif" or v contains "mp3" then--rΘponse associΘe α un son
if v contains "(OK)" then NoGood = j
if v contains "aif" then
suffixe =".aif"
else
if v contains "mp3" then
suffixe =".mp3"
end if
end if
L_localQ.add(["S", "S"&gimme2digits(i)&"_"&j&suffixe])
else--rΘponse associΘe α un texte
if v contains "(OK)" then
NoGood = j
EOL = offset("(OK)",v)-1
v= cleanTail(v.char[1..EOL-1])
end if
L_localQ.add(["T", cleanTail(v)])
end if
end if
end if
end if
end repeat
L_localQ.add(NoGood)
LQ.add(L_localQ)
end repeat
fin = count(LQ)
tampon = member("localdata").line[1..7]
member("localdata").text = EMPTY
member("localdata").text = tampon
repeat with i = 1 to fin
member("localdata").line[i + 7] = LQ[i]
end repeat
end
----------------
on printJLM
case(the paramCount) of
0:--impression d'Θcran
imprime()
1:--impression d'acteur sans prΘcision de distrib
NoDistrib = 1
imprimeActeur(member(param(1)).memberNum,NoDistrib)
2:--impression d'acteur dΘfini par n0 de distrib et nom
imprimeActeur(member(param(1)).memberNum,member(param(1)).castLibNum)
end case
end
---------------------------
on zScore NoPHASE,MODE, COIN_HG_FEN
global gScore_Fen,gScore_NomFic,gModeScore
gModeScore = MODE
case(NoPHASE) of
1:--ouverture de la fenΩtre de score
gScore_NomFic = "M"&gimme2digits(zNoMobi())&zRacine()
Nomdir = zRacine()&"_SCORE"
gScore_fen = window(Nomdir&"_TEMP")
x0 = the stageLeft
y0 = the stageTop
if D10() then window().new(Nomdir&"_TEMP")
Maskrect = [member(Nomdir&"_MASK").width,member(Nomdir&"_MASK").height]
x1= x0 + COIN_HG_FEN[1]
y1 = y0 + COIN_HG_FEN[2]
rect_Fen = rect(x1,y1, x1 + Maskrect[1] ,y1 + Maskrect[2])
gScore_fen .rect = rect_Fen
gScore_fen .filename = "@/"&Nomdir
case(lien()) of
":":--------------------------------------- on est sur un Mac
case(zOs()[2]>=10) of
1:------------------------------------------- on est sous OsX
gScore_fen.appearanceOptions.mask = member(Nomdir&"_MASK")
gScore_fen.type = #tool
gScore_fen.appearanceOptions.shadow = FALSE
0:------------------------------------------- on est sous Classic
gScore_fen.appearanceOptions.mask = member(Nomdir&"_MASK")
end case
"\":--------------------------------------- on est sur un Pc
gScore_fen.type = #tool
gScore_fen.appearanceOptions.mask = member(Nomdir&"_MASK")
end case
gScore_fen.title =EMPTY
gScore_fen.open()
2:--rΘouverture pour consultation des rΘsultats
tell gScore_Fen
gScore_fen.open()
go "RESULTAT"
end tell
end case
end
------------------------